package prac;

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
       // 注意 while 处理多个 case
            int a = in.nextInt();
            int b = in.nextInt();
          BigDecimal result=new BigDecimal("0");
       for(int i=1;i<=b;i++){
           //计算当前值
           StringBuffer sb=new StringBuffer();
           for(int j=1;j<=i;j++){
               sb.append(a+j-1);
           }
           result=new BigDecimal(sb.toString()).add(result);
       }
        System.out.println(result.toString());
    }
}
